public class Fourchette {
	public int num;
	private boolean verrou;
	public Fourchette(int num) {
		this.num = num;
		verrou = false;
	}
	public synchronized boolean setVerrou(){
		if( verrou == false){
			verrou = true;
			return true;
		} else {
			return false;
		}
	}
	
	public boolean getVerrou() {
		return verrou;
	}
	public synchronized boolean releaseVerrou() {
		if( verrou == true){
			verrou = false;
			return true;
		} else {
			return false;
		}
		
	}
}
